﻿#include<stdio.h>
int main() {
    int N = 0;
    while (scanf_s("%d", &N) != EOF)
    {
        int n = N;
        int m = N;
        int h = N;
        n %= 1000;
        m %= 1000000;
        m /= 1000;
        h /= 1000000;
        if (N < 999)
            printf("%d", n);
        else if (N < 999999)
            printf("%d,%d", m, n);
        else if (N < 2000000000 && N>1000000)
            printf("%d,%d,%d", h, m, n);
        else
            printf("2,000,000,000");
    }
    return 0;
}